import ajax from "./request.js"



//首页接口 r=api.index.index_info
export function api_index_index_info(openid) {
	return ajax('api.index.index_info', {
		openid
	})
}

// 获取app版本号  acommsion.getappversion
export function acommsion_getappversion() {
	return ajax('acommsion.getappversion')
}

//商品详情 goods.detail
export function goods_detail(data) {
	return ajax('goods.detail', data)
}

// goods.picker
export function goods_picker(data) {
	return ajax('goods.picker', data)
}

//member.favorite.toggle
export function member_favorite_toggle(data) {
	return ajax('member.favorite.toggle', data)
}

//member.cart.add
export function member_cart_add(data) {
	return ajax('member.cart.add', data)
}


//获取确认订单数据  order.create
export function order_create(data) {
	return ajax('order.create', data)
}
// member.address
export function member_address(openid) {
	return ajax('member.address', {
		openid
	})
}
// member.address.post
export function member_address_post(data) {
	return ajax('member.address.post', data)
}

// order.create.submit
export function order_create_submit(data) {
	return ajax('order.create.submit', data)
}
//order.pay
export function order_pay(data) {
	return ajax('order.pay', data)
}

//order.pay.complete
export function order_pay_complete(data) {
	return ajax('order.pay.complete', data)
}


//order.pay.success
export function order_pay_success(data) {
	return ajax('order.pay.success', data)
}

//api.index.order_check 
export function api_index_order_check(data) {
	return ajax('api.index.order_check', data)
}

// api.index.goods_search
export function api_index_goods_search(data) {
	return ajax('api.index.goods_search', data)
}



// order_create,
// member_address,
// member_address_post,
// order_create_submit